package org.dk.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import org.dk.pojo.TbSeckillGoods;
import org.dk.service.SeckillService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("seckillController")
public class SeckillController {

    @Reference(timeout = 30000)
    private SeckillService seckillService;

    @RequestMapping("toSeckill")
    public String ToIndex(Model model){
        List<TbSeckillGoods> list = seckillService.selectSeckill();
        model.addAttribute("goodList",list);
        return "seckill-index";
    }
}
